package com.zhangchuchu.neohealth.service.impl;

import com.zhangchuchu.neohealth.entity.DTO.RecordsDTO;
import com.zhangchuchu.neohealth.entity.Records;
import com.zhangchuchu.neohealth.mapper.RecordsMapper;
import com.zhangchuchu.neohealth.service.RecordsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecordsServiceImpl extends ServiceImpl<RecordsMapper, Records> implements RecordsService {
    @Override
    public int countRecordsByMonth(Integer year, Integer month) {
        return baseMapper.countRecordsByMonth(year,month);
    }

    @Override
    public List<RecordsDTO> getRecordsWithUserProfile(Integer userId, Integer year, Integer month) {
        return baseMapper.getRecordsWithUserProfile(userId, year, month);
    }
}
